package com.ywl.study.sharding.study04;

import lombok.extern.slf4j.Slf4j;
import org.apache.shardingsphere.api.sharding.hint.HintShardingAlgorithm;
import org.apache.shardingsphere.api.sharding.hint.HintShardingValue;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

@Slf4j
public class MyTableHintShardingAlgorithm implements HintShardingAlgorithm<Long> {
    @Override
    public Collection<String> doSharding(Collection<String> collection, HintShardingValue<Long> hintShardingValue) {
        log.info("MyTableHintShardingAlgorithm..............");

        List<String> list=new ArrayList<>();
//        list.add("t_order_0");
        list.add("t_order1");
        return list;
    }
}
